package com.dragee.modules.officialWebsite.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 新闻
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-04-27 13:33:27
 */
@Data
@TableName("gw_news")
public class NewsEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id;

    /**
     * 标题
     */
    private String title;

    private String type;

    /**
     * 内容
     */
    private String context;
    private String fileId;

    private String discription;

    private Date sendTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 
     */
    private Integer status;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 排序字段
     */
    @TableField(fill = FieldFill.INSERT)
    private Long sort;
    @TableField(exist = false)
    private String fileName;
    @TableField(exist = false)
    private String filePath;

    }